package com.etc.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.etc.entity.Comment;
import com.etc.entity.LayuiDate;
import com.etc.entity.Users;
import com.etc.service.CommentService;
import com.etc.service.UsersService;

@Controller
public class BgCommentController {

	@Autowired
	private CommentService commentservice;
	
	@GetMapping(value="commentall")
	@ResponseBody
	public LayuiDate<Comment> selComment(@RequestParam(defaultValue="1", value="page") int page,
			@RequestParam(defaultValue="10", value="limit") int limit,
			@RequestParam(defaultValue="", value="keywords") String keywords) {
		
		LayuiDate<Comment> layuiDate = commentservice.selectCommentByPageLike(page, limit, keywords);
	
		return layuiDate;
	}
	
}
